package de.openlaboratory.elib.utilities.database;

import java.util.Properties;

public class PropertiesHelper {
	public static Properties getHibernateProperties()
	{
		Properties properties = new Properties();

		getLocalSqliteProperties(properties);

		return properties;
	}

	static void getLocalOracleProperties(Properties properties)
	{
		properties.setProperty("hibernate.connection.driver_class", "oracle.jdbc.driver.OracleDriver");
		properties.setProperty("hibernate.connection.url", "jdbc:oracle:thin:@host:1521:databaseName");
		properties.setProperty("hibernate.connection.username", "YOURSCHEMA");
		properties.setProperty("hibernate.connection.password", "YOURPASSWORD");
		properties.setProperty("hibernate.default_schema", "YOURSCHEMA");
		properties.setProperty("hibernate.dialect", "org.hibernate.dialect.OracleDialect");
	}

	static void getLocalSqliteProperties(Properties properties)
	{
		properties.setProperty("hibernate.connection.driver_class", "org.sqlite.JDBC");
		properties.setProperty("hibernate.connection.url", "jdbc:sqlite:C:/Users/xeiojt/dev/database/sqlite/jdqbc-test.db");
		properties.setProperty("hibernate.dialect", "de.openlaboratory.elib.database.sqlite.SQLiteDialect");
		
		properties.setProperty("hibernate.default_schema", "elib");
     	properties.setProperty("hibernate.hbm2ddl.auto", "create");
     	
		properties.setProperty("hibernate.show_sql", "true");
		properties.setProperty("hibernate.format_sql", "true");
		// properties.setProperty("javax.persistence.validation.mode", "none");
	}
}
